<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
   function Goods(name,price,count){
        this.name=name
        this.price=price
        this.count=count
   }
   const good1=new Goods("小米",1999,20)
   const good2=new Goods("华为",2999,10)
   const goods=new Goods("联想",3999,2)
   Goods.brand="牌子"
  Goods.sayHi=function(){
       console.log("hi~")
  }
  Goods.sayHi()
  </script>
</body>
</html>